import winsound


def beep():
    # 在Windows系统中发出声音报警
    i = 0
    while i < 20:
        i += 1
        winsound.Beep(2000, 500)
        winsound.Beep(1000, 500)

# 发出声音报警


